package Module;

import java.sql.Timestamp;
import java.text.SimpleDateFormat;

/**
 * Creat with IntelliJ IDEA
 * Description
 * User: mamba24
 * Date: 2022-11-28
 * Time: 20:14
 * To BE A Better Person-2020-3-2
 */
public class Blog {
        private int blogid;
        private String title;
        private String content;
        private int userid;
        private Timestamp posttime;

        public int getBlogid() {
            return blogid;
        }

        public void setBlogid(int blogid) {
            this.blogid = blogid;
        }

        public String getTitle() {
            return title;
        }

        public void setTitle(String title) {
            this.title = title;
        }

        public String getContent() {
            return content;
        }

        public void setContent(String content) {
            this.content = content;
        }

        public int getUserid() {
            return userid;
        }

        public void setUserid(int userid) {
            this.userid = userid;
        }

        public String getPosttime() {
            SimpleDateFormat simpleDateFormat=new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
            return simpleDateFormat.format(this.posttime);
        }

        public void setPosttime(Timestamp posttime) {
            this.posttime = posttime;
        }

        @Override
        public String toString() {
            return "Blog{" +
                    "blogid=" + blogid +
                    ", title='" + title + '\'' +
                    ", content='" + content + '\'' +
                    ", userid=" + userid +
                    ", posttime=" + posttime +
                    '}';
        }
    }


